function pbOkVideoInputDlg_Callback(h, e)
%PBOKVIDEOINPUTDLG_CALLBACK Summary of this function goes here
%   Detailed explanation goes here

handles= guihandles(h);

mainfig = findobj('tag', 'dhaqtool');
IniFile= getappdata(mainfig, 'IniFile');

DeviceID= uicontrol_SelectedIndex(handles.pmDevices);
Adaptor= uicontrol_SelectedItem(handles.pmAdaptors);
Format= uicontrol_SelectedItem(handles.lbFormats);

% Write selection to Inifile
writeKeys = {'VideoInput','','DeviceID', DeviceID;...
          'VideoInput','','Adaptor', Adaptor;...
          'VideoInput','','Format', Format};
inifile(IniFile,'write',writeKeys,'plain');

% Update statusbar

close(gcf)

end

